import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询 /vsRetailOrder/searchRetailOrderForFactoryEnd
export const queryList = (params) => axios.post(`${SERVER.WHOLESALES}/retailOrder/selectRetailOrder`, params)
// 详情  /vsRetailOrder/searchRetailOrderById
export const queryRetailOrderById = (Id) => axios.get(`${SERVER.WHOLESALES}/retailOrder/selectRetailOrderDetail?id=${Id}`)

// 导出 /vsRetailOrder/searchRetailOrderForDealerExcel
export const exportExcel = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrder/searchRetailOrderForExcel`, params, {
  responseType: 'blob'
})
// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

//查询所有品牌
export const getBrandAll = () => axios.post(`${SERVER.WHOLESALES}/retailOrder/findBranId`, { data: {} });

//品牌改变时查询车系
export const getSeriesAll = params => axios.post(`${SERVER.WHOLESALES}/retailOrder/findSeriesId`, params);

//车系改变时查询车型
export const getModelAll = params => axios.post(`${SERVER.WHOLESALES}/retailOrder/findModelId`, params);

//车型改变时查询配置
export const getConfigAll = params => axios.post(`${SERVER.WHOLESALES}/retailOrder/findPageId`, params);

//查询所有外饰色
export const getColorAll =  params => axios.post(`${SERVER.WHOLESALES}/retailOrder/findColorId`,params);

//查询所有内饰色
export const getTrimAll =  params => axios.post(`${SERVER.WHOLESALES}/retailOrder/findTrimColorId`,params);


